home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
oath.lha
/
oath
/
test
/
README
< prev
next >
Wrap
Text File
|
1991-08-29
|
4KB
|
172 lines
Test files for OATH, in order of complexity:
chars1.cc -- tests character
bi1.cc -- tests bigInteger
biadd.cc -- adds two bigIntegers from command line
bimul.cc -- multiplies two bigIntegers from command line
hs1.cc -- tests hashSet
cs1.cc -- tests characterSet
pdl1.cc -- tests pdList
dll1.cc -- tests dlList
ms1.cc -- tests minString
anycase.cc -- tests matchAnyCase of minString
toks1.cc -- tests stringTable and stringToken
stable.cc -- tests retrieveal from stringTables
gctest.cc -- tests garbage collection
Files whose names end with "0" include all .cc's from OATH that are necessary.
Thus, no linking is required. All other files are compiled separately and
linked with the .o's of the OATH library.
Expected output:
[ninja:421] chars1
ABCD
== succeeded!
is() succeeded!
! succeeded!
ABCD
== succeeded!
is() succeeded!
! succeeded!
[ninja:422] bi1
Z = 0
O = 1
A = -1234567890
B = -987654321
A+=B = -2222222211
A+=B = -3209876532
A+=B = -4197530853
A+=B = -5185185174
A+=B = -6172839495
A+=B = -7160493816
[ninja:423] hs1
Success 1
Success 2
Success 3
Success 4
Success 5
Success 6
Count should be 100000: 100000
Time to process 100000*8 contains calls:
Real Time = 2997 ms
CPU Time = 2830 ms
[ninja:424] cs1
Success 1
Success 2
Success 3
Success 4
Success 5
Count should be 100000: 100000
Time to process 100000*8 contains calls:
Real Time = 1119 ms
CPU Time = 910 ms
[ninja:425] pdl1
ABCD
is() succeeded!
== succeeded!
isEmpty() succeeded!
contains() succeeded!
There are 3 characters in L1: CBA
The second character is B
The first character removed is C
There are 2 characters in L2: BA
[ninja:426] dll1
ABCD
is() succeeded!
== succeeded!
isEmpty() succeeded!
contains() succeeded!
There are 3 characters in L1: ABC
The second character is B
The first character removed is A
There are 2 characters in L2: BC
[ninja:427] ms1
tar (2358)
stare (38973)
First char is s
Char after tar is e
It can match 'sta', if you wish.
It just matched nothing successfully.
Sbuffer is 42 char's long.
Success! The buffers are the same!
[ninja:428] anycase
tolower() seems to work.
Four tests:
1 -- range; now at R
2 -- Range; now at R
3 -- RANGE; now at r
4 -- rANGE; now at *
End tests.
[ninja:429] toks1
tar (2358)
tar (2358)
star (9718)
stare (38973)
Star == Star2
Star != Sstar
Begin forming tokens:
Ttar == Ttar2
Table formed.
Table has member Ttar.
Atar = tar
Table has member Ttar2.
Atar2 = tar
Table has member Tstar.
Astar = star
Table has member Tstare.
Astare= stare
[ninja:430] stable
sizeof(stringTableA) = 4
sizeof(stringTableG) = 28
sizeof(stNodeP) = 12
Declaration hash(106585786) mod7(6) mod11(10)
Definition hash( 26695354) mod7(0) mod11(4)
Initializer hash(114729958) mod7(0) mod11(2)
1000000 retrievals from int I ------ 420 ms
1000000 retrievals from DeclValue -- 1220 ms
1000000 retrievals from ST7 -------- 10680 ms
1000000 retrievals from ST11 ------- 9400 ms
[ninja:431] gctest
Beginning test. Press c-C to stop.
0 : constructing 100000 tokens. Press c-C to stop.
2733 : constructed 100000 tokens. Press c-C to stop.
5102 : constructing 100000 tokens. Press c-C to stop.
6913 : constructed 100000 tokens. Press c-C to stop.
9274 : constructing 100000 tokens. Press c-C to stop.
11087 : constructed 100000 tokens. Press c-C to stop.
13502 : constructing 100000 tokens. Press c-C to stop.
15351 : constructed 100000 tokens. Press c-C to stop.
17670 : constructing 100000 tokens. Press c-C to stop.
19522 : constructed 100000 tokens. Press c-C to stop.
^C
(You must press c-C to stop this program. You can observe the
memory being consumed by this process via utility 'top'.
After the second iteration, the memory consumed should NOT
grow. Also the times (left of the colon) should be relatively
uniform.
)